projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c1cfd8
)
GtkAnimationDescription: parse "loop" correctly.
author
Carlos Garnacho
<carlosg@gnome.org>
Mon, 22 Nov 2010 02:43:56 +0000
(
03:43
+0100)
committer
Carlos Garnacho
<carlosg@gnome.org>
Sat, 4 Dec 2010 14:39:25 +0000
(15:39 +0100)
This sscanf parsing needs to go...
gtk/gtkanimationdescription.c
patch
|
blob
|
history
diff --git
a/gtk/gtkanimationdescription.c
b/gtk/gtkanimationdescription.c
index cef6ade0c8df0d0bf619a6bcebc09d86b227085a..785018ad37a1af73654f36b816e2610235583ef4 100644
(file)
--- a/
gtk/gtkanimationdescription.c
+++ b/
gtk/gtkanimationdescription.c
@@
-84,11
+84,12
@@
gtk_animation_description_from_string (const gchar *str)
{
gchar timing_function[16] = { 0, };
gchar duration_unit[3] = { 0, };
+ gchar loop_str[5] = { 0, };
GtkTimelineProgressType progress_type;
guint duration = 0;
gboolean loop;
- if (sscanf (str, "%d%2s %15s
loop", &duration, duration_unit, timing_function) == 3
)
+ if (sscanf (str, "%d%2s %15s
%5s", &duration, duration_unit, timing_function, loop_str) == 4
)
loop = TRUE;
else if (sscanf (str, "%d%2s %15s", &duration, duration_unit, timing_function) == 3)
loop = FALSE;